// for testing purpose

import java.net.*;
import java.net.Socket;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Server {
	private static ServerSocket serverSocket;
	private static Socket client;
	public static BufferedReader buffer;
	public static String inputLine;
	
	public static void main(String[] args){
		try{
			serverSocket = new ServerSocket(8888);
			client = serverSocket.accept();
			
       	    buffer = new BufferedReader(new InputStreamReader(client.getInputStream()));
			           
			            while((inputLine = buffer.readLine()) != null)
			            System.out.println(inputLine);
	    }
		catch(IOException e){
		      System.out.println("Error: "+ e.toString());
	    }
	}
	
	
	
}
